package com.xm.servlet.background.menu;

import lombok.SneakyThrows;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 主页菜单功能
 * @author 康文程
 * @date 2023-12-14 下午 08:14
 */

@WebServlet("/background/menu")
public class MenuServlet extends HttpServlet {

    @SneakyThrows(Exception.class)
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
        String menuId = req.getParameter("menuId");
        //传回
        req.setAttribute("menu",Integer.parseInt(menuId));
        req.getRequestDispatcher("/WEB-INF/page/background/home.jsp").forward(req, resp);
    }

}
